"""
#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""

import time
import subprocess

time.sleep(120)

while True:
    print('Starting circle code...')
    process1 = subprocess.Popen(['D:\\python37\\python.exe', 'video_writer.py'])
    time.sleep(600)
    print('Stop circle code...')
    process1.terminate() # 10min后关闭程序

    print('Starting sleeping code...')
    process2 = subprocess.Popen(['D:\\python37\\python.exe', 'sleep_code.py'])
    time.sleep(600)
    process2.terminate() # 10min后关闭程序
    print('Stop sleeping code...')





